#ifndef __SCC_SCCILP_H
#define __SCC_SCCILP_H

#include "sc.h"
#include "scu.h"

#define SCCILP_SEQUENCE_INPUT "data/seq*"
#define SCCILP_IMAGE_INPUT  "data/in%d.raw"
#define SCCILP_IMAGE_OUTPUT "data/out%d.raw"

#define scuBufferGetStride(x) 1024
#define scuBufferGetLines(x)  1024

extern log_default_streams_t ilpl;

typedef struct ilp_arg_s
{
  short int id;
  unsigned short int type;
  union
  {
    unsigned char b[8];    /* Must be 4-byte aligned for TriMedia! */
    int d;
    double f;
  } data;
  unsigned short int intent;
  scu_buf_t *buffer;
  scu_bufptrid_t reader;
  unsigned char *buf;
} ilp_arg_t;

typedef struct ilp_op_s
{
  short int id;
  unsigned short int operation;
  ilp_arg_t argument[SC_MAX_ARGUMENTS];
  unsigned short int arguments, argreceived;
} ilp_op_t;

void scIlpInit(int proc);
void ilpOperationEnqueue(ilp_op_t *op);
void ilpCustomOperationEnqueue(ilp_op_t *op);
void ilpMergedOperationEnqueue(ilp_op_t *op);

#endif /* __SCC_SCCILP_H */
